LIBNAME = c2lib.a

CFLAGS  = -O2 -Wall

SRCS = codebook.c codebookd.c codebookdvq.c codec2.c fft.c interp.c kiss_fft.c lpc.c lsp.c nlp.c pack.c phase.c postfilter.c quantise.c sine.c
OBJS = codebook.o codebookd.o codebookdvq.o codec2.o fft.o interp.o kiss_fft.o lpc.o lsp.o nlp.o pack.o phase.o postfilter.o quantise.o sine.o
HDRS = codec2.h

all: $(LIBNAME)

$(LIBNAME): $(OBJS)
	$(CC_PREFIX)ar cru $(LIBNAME) $(OBJS)

%.o: %.c $(HDRS) Makefile
	$(CC_PREFIX)gcc $(CFLAGS) -c $(SRCS)

clean:
	rm -f $(LIBNAME)
	rm -f *.o

